this._updateBackgroundActor();
});
+ let loadedSignalId = background.connect('loaded', () => {
+ background.disconnect(loadedSignalId);
+ loadedSignalId = null;
+ this.emit('loaded');
+ });
+
backgroundActor.connect('destroy', () => {
if (changeSignalId)
background.disconnect(changeSignalId);
+ if (loadedSignalId)
+ background.disconnect(loadedSignalId);
+
if (backgroundActor.loadedSignalId)
background.disconnect(backgroundActor.loadedSignalId);
});
}
}
+ _waitLoaded(bgManager) {
+ return new Promise(resolve => {
+ const id = bgManager.connect('loaded', () => {
+ bgManager.disconnect(id);
+ resolve();
+ });
+ });
+ }
+
_updateBackgrounds() {
for (let i = 0; i < this._bgManagers.length; i++)
this._bgManagers[i].destroy();
this._bgManagers = [];
if (Main.sessionMode.isGreeter)
- return;
+ return Promise.resolve();
for (let i = 0; i < this.monitors.length; i++) {
let bgManager = this._createBackgroundManager(i);
if (i != this.primaryIndex && this._startingUp)
bgManager.backgroundActor.hide();
}
+
+ return Promise.all(this._bgManagers.map(this._waitLoaded));
}
_updateKeyboardBox() {
// When starting a normal user session, we want to grow it out of the middle
// of the screen.
- _prepareStartupAnimation() {
+ async _prepareStartupAnimation() {
// During the initial transition, add a simple actor to block all events,
// so they don't get delivered to X11 windows that have been transformed.
this._coverPane = new Clutter.Actor({ opacity: 0,
} else if (Main.sessionMode.isGreeter) {
this.panelBox.translation_y = -this.panelBox.height;
} else {
- this._updateBackgrounds();
-
// We need to force an update of the regions now before we scale
// the UI group to get the correct allocation for the struts.
this._updateRegions();
this.uiGroup.scale_x = this.uiGroup.scale_y = 0.75;
this.uiGroup.opacity = 0;
global.window_group.set_clip(monitor.x, monitor.y, monitor.width, monitor.height);
+
+ await this._updateBackgrounds();
}
this.emit('startup-prepared');